<?php
/**
 * Created by PhpStorm.
 * User: august
 * Date: 2021/3/31
 * Time: 17:24
 */

namespace Aug\Tools\traits;

trait Singleton
{
    private static $instance;

    public static function getInstance($params = [])
    {
        if (!self::$instance) {
            self::$instance = new static($params);
        }

        return self::$instance;
    }

    protected function __construct()
    {
    }

    protected function __clone()
    {
    }
}